package com.brin.code.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.brin.code.model.vo.UserVO;

@Controller
public class UserController {

	@RequestMapping("/user/login")
	public @ResponseBody String userLogin(UserVO vo, Map<String, Object> model){
		
		System.out.println("==================" + vo.getUserName());
		System.out.println("==================" + vo.getPassword());
		return "SUCCESS";
	}
	
	@RequestMapping("/user/loging")
	public @ResponseBody UserVO userLoign(UserVO vo, Map<String, Object> model){
		System.out.println("==================" + vo.getUserName());
		System.out.println("==================" + vo.getPassword());
		return vo;
	}
	
	@RequestMapping("/user/test")
	public UserVO test(UserVO vo, Map<String, Object> model){
		vo.setUserName("hello");
		model.put("vo", vo);
		return vo;
	}
}
